<!-- AUI Framework -->
<!DOCTYPE html>
<html>
<head>
<!-- <meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
<!-- <link href="~/Content/Images/favicon2.ico" rel="shortcut icon" type="image/x-icon" /> -->
<title>
	<#if entity??>
		${entity.globalNetName?default('Web测试')}
	</#if>
</title>
	
<link href="/login/css/cars-framework.css" rel="stylesheet" />
<link href="/login/css/cars-login.css" rel="stylesheet" />
<link href="/login/css/zzsc.css" rel="stylesheet" />
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />

<script src="/login/js/jquery-1.7.2.js"></script>
<script src="/login/js/jquery.cookie.js"></script>

<script src="/login/js/cars-framework.js"></script>
<script src="/login/js/jQuery.md5.js"></script>
<script type="text/javascript" src="/login/js/jquery.tips.js"></script>
 <script>
        /*
        检查浏览器是否支持
        */
        var isIE = !!window.ActiveXObject;
        var isIE6 = isIE && !window.XMLHttpRequest;
        if (isIE6) {
            window.location.href = "../Error/Browser";
        }
        //回车键
        document.onkeydown = function (e) {
            if (!e) e = window.event; //火狐中是 window.event
            if ((e.keyCode || e.which) == 13) {
                var btlogin = document.getElementById("btlogin");
                btlogin.focus();
                btlogin.click();
            }
        }
    //登录加载
    function Load() {
        var Index = $.cookie('UItheme');
        if (Index) {
            window.location.href = '@Url.Content("~/Home/")' + Index;
        } else {
            window.location.href = '@Url.Content("~/Home/AccordionIndex")';
        }
        return false;
    }
    //提示信息
    function formMessage(msg, type) {
        $('.form-message').html('');
        $('.form-message').append('<div class="form-' + type + '-text">' + msg + '</div>');
    }
    </script> 
</head>
<body class="Loginbody">
<form action="" onsubmit="return false;"
		  id="login-validation"
		  method="post" >
	<input type=hidden id="ssid" name="ssid" value="85CA747ADE1819476B0FC3F991362E70">
	<div class="logo">
		<span style="font-size:30px;color:white;font-family:幼圆;vertical-align:middle;line-height:80px;text-align:center;width: 983px;display:block;height:80px">
		<#if entity??>
			${entity.globalNetName?default('Web测试')}
		</#if>
		</span>
        <#--<img src="/login/images/loginlogo.png" />-->
    </div>
    <div class="content">
        <div class="Loginform">
            <div class="form-message">
            </div>
            <div class="form-account">账户：
                <input id="txtaccount" name="txtaccount" type="text" />
            </div>
            <div class="form-password">密码：
                <input id="txtpassword" name="password" type="password" />
            </div>
            <div class="form-bottom">
                <div id="buttons">
				<button type="submit" class="btlogin"
						id="demo-form-valid" title="Validate">
					<span class="btlogin-content">登  录</span>
				</button>
				
				<script type="text/javascript">
						$(function() {
							$("#buttons .btlogin")
								.click(
									function() {
										var txtaccount = $("#txtaccount").val();
						                var txtpassword = $("#txtpassword").val();
						                if (txtaccount == "") {
						                    $("#txtaccount").focus();
						                    formMessage('登录账户不能为空', 'warning');
						                    return false;
						                } else if (txtpassword == "") {
						                    $("#txtpassword").focus();
						                    formMessage('登录密码不能为空', 'warning');
						                    return false;
						                } else {
						    				var code = txtaccount+","+txtpassword;
						    				$.ajax({
						    					type: "POST",
                                                url : '/login_tologin/'+txtaccount+'/'+txtpassword,
						    			    	data: {tm:new Date().getTime()},
						    					dataType:'json',
						    					cache: false,
						    					async:false,
						    					success: function(result){
						    						if("SUCCESS" == result.msg){
                                                        window.location.href = "/main";
						    						}else if("USERNOTEXIST" ==result.msg){
						    							$("#txtaccount").tips({
						    								side : 1,
						    								msg : "用户不存在！",
						    								bg : '#FF5080',
						    								time : 15
						    							});
						    							$("#txtaccount").focus();
						    						}else if("USERNAMEORPASSISERROR" == result.msg){
						    							$("#txtaccount").tips({
						    								side : 1,
						    								msg : "用户名或密码有误！",
						    								bg : '#FF5080',
						    								time : 15
						    							});
						    							$("#txtaccount").focus();
						    						}else if("USERISLOCKED"==result.msg){
						    							$("#txtaccount").tips({
						    								side : 1,
						    								msg : "用户未被激活！",
						    								bg : '#FF5080',
						    								time : 15
						    							});
						    							$("#txtaccount").focus();
						    						}else{
						    						}
						    					},
						    			    	error:function(){
						    			    	}
						    				});
										}
									});
																	
						});
				</script>
				</div>							
            </div>
        </div>
        
    </div>
    <div style="color:white;font-size:20px;text-align:center;margin:auto;">
    	<br/>
    	<p style="font-size:15px">
<#if entity??>
		${entity.globalNetName?default('Web测试')}
</#if>
		</p>
    	<p style="font-size:15px">
    		&nbsp;&nbsp;建议使用IE9以上版本1280×1024分辨率浏览本站
    	</p>
    </div>
</form>

</body>
</html>
